using System.Collections.Generic;
using Newtonsoft.Json;

namespace Betfair.Api
{
    public sealed class MarketCatalogue
    {
        public MarketCatalogue(string id, string name, string startTime, MarketDescription description,
            double totalMatched, IList<RunnerCatalogue> runners, EventType eventType, Competition competition,
            Event @event)
        {
            Id = id;
            Name = name;
            StartTime = startTime;
            Description = description;
            TotalMatched = totalMatched;
            Runners = runners;
            EventType = eventType;
            Competition = competition;
            Event = @event;
        }

        [JsonProperty("marketId")]
        public string Id { get; private set; }

        [JsonProperty("marketName")]
        public string Name { get; private set; }

        [JsonProperty("marketStartTime")]
        public string StartTime { get; private set; }

        [JsonProperty("description")]
        public MarketDescription Description { get; private set; }

        [JsonProperty("totalMatched")]
        public double TotalMatched { get; private set; }

        [JsonProperty("runners")]
        public IList<RunnerCatalogue> Runners { get; private set; }

        [JsonProperty("eventType")]
        public EventType EventType { get; private set; }

        [JsonProperty("competition")]
        public Competition Competition { get; private set; }

        [JsonProperty("event")]
        public Event Event { get; private set; }
    }
}